ATS/LF: A type system for construct- ing proofs as total functional programs
نویسنده
چکیده
The development of Applied Type System (ATS) [36, 31] stems from an earlier attempt to introduce dependent types into practical programming [38, 37]. While there is already a framework Pure Type System [4] (PTS) that offers a simple and general approach to designing and formalizing type systems, it has been understood that there are some acute problems with PTS that make it difficult to support, especially, in the presence of dependent types various common programming features such as general recursion [10], recursive types [19], effects [17], exceptions [15] and input/output, etc. To address such limitations of PTS, ATS is proposed to allow for designing and formalizing type systems that can readily accommodate common realistic programming features. The key salient feature of ATS lies in a complete separation of the statics, where types are formed and reasoned about, from the dynamics, where programs are constructed and evaluated. With this separation, it is no longer possible for a program to occur in a type as is otherwise allowed in PTS. We have now designed and implemented ATS, a programming language with its type system rooted in ATS. The work we report here is primarily motivated by a need for combining programs with proofs in ATS. Before going into further details, we would like to present an example to clearly illustrate the motivation. In ATS, we can declare a function append (through a form of syntax rather similar to that of Standard ML [20]) in Figure 1. We use list as a type constructor. When applied to a type T and an integer I, list(T, I) forms a type for lists of length I in which each element is of type T . The two list constructors nil and cons are assigned the following
منابع مشابه
Combining Proofs and Programs in a Dependently Typed Language ( With technical appendix )
Most dependently-typed p rogramming languages either require that all expressions terminate (e.g. Coq, Agda, and Epigram), or allow infinite loops but are inconsistent when viewed as logics (e.g. Haskell, ATS, Ωmega). Here, we combine these two approaches into a single dependently-typed core language. The language is composed of two fragments t hat share a common syntax and overlapping semantic...
متن کاملATS: A Language That Combines Programming with Theorem Proving
ATS is a language with a highly expressive type system that supports a restricted form of dependent types in which programs are not allowed to appear in type expressions. The language is separated into two components: a proof language in which (inductive) proofs can be encoded as (total recursive) functions that are erased before execution, and a programming language for constructing programs t...
متن کاملType-directed Syntax Transformations for ATS-style Programs with Proofs
In their work on ATS [CX05] and ATS [CX04], the authors present an ML-like language which distinguishes between term-level “dynamic” expressions which may contain side effects and pure “static” expressions which are functions on proof objects and might occur inside types. This distinction allows programmers to combine code (potentially containing side effects) with proofs, and with the help of ...
متن کاملBeluga: Programming with Dependent Types, Contextual Data, and Contexts
The logical framework LF provides an elegant foundation for specifying formal systems and proofs and it is used successfully in a wide range of applications such as certifying code and mechanizing metatheory of programming languages. However, incorporating LF technology into functional programming to allow programmers to specify and reason about formal guarantees of their programs from within t...
متن کاملA Cost-Effective Foundational Certified Code System
Certified code systems enable untrusted programs to be proven safe to execute in a machine–checkable manner. Recent work has focused on building foundational certified code systems, where safety is defined relative to a concrete machine architecture. We wish to build a cost–effective system, with practicality along two dimensions — the intellectual effort to engineer the proofs, and the resourc...
متن کامل